		$(function(){
			$("form").validate({
				rules:{
					inpusername:{required:true},
					inppsw:{required:true,rangelength:[6,20]}
				},
				messages:{
					inpusername:{required:"请输入手机号/邮箱/会员号。"},
					inppsw:{required:"密码不能为空！",rangelength:"密码长度必须为6~20位！"}
				}
				
			});
			
			$('#top_cancel,#cancel').click(function(){
					$('#box,#bigbox').css('display','none');
				});
				$('#confirm').click(function(){
					window.location.href = "fstvgo_register.html";
				});
		});
		
		$.validator.setDefaults({
				submitHandler: function() {
					var $inpusername = $('#inpusername').val(),
						$inppsw = $('#inppsw').val();
					var obj = JSON.parse($.cookie('setPerson'));
					var landstatus = $.cookie('landing');
						for (var i=0;i<obj.data.length;i++) {
							if ($inpusername == obj.data[i].name && $inppsw == obj.data[i].pass) {
								landstatus = 1;
								$.cookie('landing',landstatus);
								
								window.location.href="fstvgo_home_page0.html";
								return;
							}
						}
						$('#box,#bigbox').css('display','block');
    			}
			});